﻿/*---------------------------------------------------------------------*/
// fileName="IDNMapping.cs" CompanyName="SureKAM"
// Copyright SureKAM (c). All right reserved.
/*---------------------------------------------------------------------*/

namespace SureKAM.BackUp.Notify.DataAccess
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using SureKAM.BackUp.Notify.Domain;

    /// <summary>
    /// 通知者与目录Mapping仓储接口
    /// </summary>
    public interface IDNMapping
    {
        /// <summary>
        /// 添加一条Mapping记录
        /// </summary>
        /// <param name="directoryNotifyMapping">DN 对象</param>
        /// <returns></returns>
        string InsertDN(DirectoryNotifyMapping directoryNotifyMapping);

        /// <summary>
        /// 删除一条Mapping记录
        /// </summary>
        /// <param name="directoryNotifyMapping">DN对象</param>
        /// <returns></returns>
        string DeleteDN(DirectoryNotifyMapping directoryNotifyMapping);

        /// <summary>
        /// 根据ID获取一条Mapping记录
        /// </summary>
        /// <param name="id">DN id</param>
        /// <returns></returns>
        Domain.DirectoryNotifyMapping GetDNById(string id);

        /// <summary>
        /// 获取所有的DN Mapping
        /// </summary>
        /// <returns></returns>
        List<Domain.DirectoryNotifyMapping> GetDNs();

        /// <summary>
        /// 保存到XML文件
        /// </summary>
        /// <returns></returns>
        bool SaveToFile();
    }
}
